package com.lyc.common.repository;

import com.lyc.common.model.BookCollect;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by 廖师兄
 * 2017-05-29 17:25
 */
public interface BookCollectRepository extends JpaRepository<BookCollect, String> {

    List<BookCollect> findByUidOrderByCreateTimeDesc(String uid);

    @Modifying
    @Transactional
    Integer deleteByCollectIdIn(List<String> collectIdList);
}
